package cn.jszhao;

import cn.jszhao.bean.AnnotationApplicationContext;
import cn.jszhao.bean.ApplicationContext;
import cn.jszhao.service.UserService;
import org.junit.jupiter.api.Test;

/**
 * @author: 紫麒麟vip
 * @create: 2024/6/29
 * Description:
 */
public class SpringIocTest {
    @Test
    public void testIoc() {
        ApplicationContext applicationContext = new AnnotationApplicationContext("cn.jszhao");
        UserService userService = (UserService)applicationContext.getBean(UserService.class);
        userService.out();
        System.out.println("run success");
    }
}
